#pragma once
#include "Common.h"
static int const FREE_LIST_SIZE = 208;
class ThreadCache
{
public:
    //从释放的内存中申请
    void* Allocate(size_t bytes);
    void Deallocate(void* obj,size_t bytes);

    //缓存中申请
    void* FetchFromCentralCache(size_t index, size_t size);
private:
    FreeList _freelists[FREE_LIST_SIZE];
};
static thread_local ThreadCache* pTLSThreadCache = nullptr;
